package com.dingwen.treasure.business.controller;

import com.dingwen.treasure.base.controller.BaseViewController;
import com.dingwen.treasure.base.pojo.vo.Result;
import com.dingwen.treasure.business.model.dto.DeserializerDto;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 　DeserializerController </br>
 * <p>模拟对对象进行反序列化，在参数封装前进行解密操作</p>
 * 　@author dingwen
 * 　@date 2022/5/15$
 */
@Api(tags = "jackson反序列化自定义对象")
@Slf4j
@RestController
@RequestMapping("deserializer")
public class DeserializerController implements BaseViewController {
    /**
     * 反序列化程序测试
     *
     * @param deserializerDto 反序列化器dto
     * @return {@link Result}
     */
    @ApiOperation(value = "反序列化程序测试")
    @PostMapping
    public Result<DeserializerDto> deserializerTest(@RequestBody DeserializerDto deserializerDto) {
        return success(deserializerDto);
    }
}
